#!/usr/bin/python
# -*- coding: utf-8 -*-
# @version        : 1.0
# @Create Time    : 2024/9/6 11:11
# @File           : feature
# @IDE            : PyCharm
# @desc           : 描述

from sqlalchemy.orm import Mapped, mapped_column
from db.db_base import BaseModel, AuditModel
from sqlalchemy import String, Boolean, Text, UniqueConstraint


class DCQARTask(AuditModel):
    __tablename__ = "dc_check_qar_task"
    __table_args__ = {'comment': 'QAR表单生成任务'}

    purchase_order: Mapped[str] = mapped_column(String(30), comment="订单号")
    part_no: Mapped[str] = mapped_column(String(40), comment="零件/材料图号")
    part_name: Mapped[str] = mapped_column(String(40), comment="零件名称")
    material_no: Mapped[str] = mapped_column(Text, comment="物料编号")

    product_type: Mapped[str] = mapped_column(String(20), nullable=True, comment="产品类型")
    part_type: Mapped[str] = mapped_column(String(20), nullable=True, comment="材料/零件类型")
    
    flight: Mapped[str] = mapped_column(String(30), nullable=True, comment="架次")
    vendor: Mapped[str] = mapped_column(String(40), nullable=True, comment="销售商")
    zpm_cpm: Mapped[str] = mapped_column(String(20), nullable=True, comment="工艺材料编号")
    size: Mapped[str] = mapped_column(String(20), nullable=True, comment="材料规格")
    quantity_weight: Mapped[str] = mapped_column(String(20), nullable=True, comment="订货数量/重量")
